package com.example.shop

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.alibaba.android.arouter.facade.annotation.Route
import com.example.base.mvvm.BaseViewActivity
import com.example.shop.databinding.ActivityShopBinding

@Route(path = "/app/ShopActivity")
class ShopActivity : BaseViewActivity<ActivityShopBinding>() {
    override fun initView() {
        //获取导航fragment宿主
        val navHostFragment = supportFragmentManager.findFragmentById(R.id.fragmentContainerView) as NavHostFragment
        //获取导航控制器
        val navController = navHostFragment.navController
        //和bottomNavigationView联动
        binding.bottom.setupWithNavController(navController)
    }

    override fun initData() {
    }

    override fun getLayout(): Int  = R.layout.activity_shop

}